#ifndef UPDATER_H
#define UPDATER_H

#ifdef __cplusplus
extern "C" {
#endif

typedef enum UP_RET {
    UP_OK = 0,
    UP_ERROR,
    UP_ERRCPY,
    UP_ERRERASE,
}UP_RET_t;


unsigned int Updater_eraseFlash(void *address,unsigned int size);
unsigned int Updater_copyFlash(void *dest,void *src,unsigned int size);

unsigned int Updater_checkSDCard();
unsigned int Updater_checkSDCard_v2();
int writeOTAData(unsigned int address_offset,void *buffer,unsigned int size);
int ble_writeOTAData(unsigned int address_offset,void *buffer,unsigned int size);
int writeSDData(unsigned int address_offset,void *buffer,unsigned int size);
#ifdef __cplusplus
}
#endif

#endif
